package com.draven.order.feign.fallback;

import com.draven.model.product.ProductDTO;
import com.draven.order.feign.ProductFeignClient;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ProductFeignClientFallBack implements ProductFeignClient {
    @Override
    public String getProduct(Long id) {
        return "兜底数据";
    }

    @Override
    public void updateStock(Long id, Integer num) {
       throw new RuntimeException("更新库存失败");
    }

    @Override
    public List<ProductDTO> productPage() {
        return List.of();
    }

    @Override
    public ProductDTO getProductDetail(Long id) {
        return null;
    }
}
